<template>
  <div>
    <div class="da">
      <p class="p1">
        <span v-for="(value, index) in arr" :key="index">
          <img src="@/assets/xing1.jpg" alt="">
        </span>
      </p>
      <p class="p2" v-bind:style="{ width: width * 20 + 'px' }">
        <span v-for="(value, index) in arr" :key="index">
             <img src="@/assets/xing2.jpg" alt="">
        </span>
      </p>
    </div>
  </div>
</template>
<style scoped>
.da {
  position: relative;
}
* {
  margin: 0;
  padding: 0;
}
.p1 {
  width: 100px;
  height: 10px;
  align-items: center;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
}
.p1 span {
  /* float: left; */
  width: 10px;
  height: 100%;
  /* background: #000; */
  border-radius: 10px;
  margin-right: 10px;
  border: none;
}
span img {
  vertical-align: top;
  width: 10px;
  height: 10px;
}
.p2 {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  height: 10px;
  align-items: center;
  box-sizing: border-box;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
}
.p2 span {
  width: 10px !important;
  height: 10px;
  /* background: yellow; */
  border-radius: 10px;
  margin-right: 10px;
}
</style>
<script>
export default {
  props: ["width"],
  data() {
    return {
      arr: [1, 2, 3, 4, 5],
    };
  },
  methods: {},
};
</script>
